apiready = function () {
    var app = new APP();
    var param = api.pageParam;
    var temp = doT.template($("#" + param.dtype).text());
    $(".outBox").html(temp(param));
    $("." + param.dtype).fadeIn(300);
    var stopPropagation = "false";//是否阻止body点击关闭dialog
    if (param.stopPropagation && param.stopPropagation == true) {
        stopPropagation = true;//是否阻止body点击关闭dialog
        $(".outBox").unbind('click');
    }
    // 处理点击空白推出
    if (stopPropagation == "false") {
        $(".outBox").click(function (e, t) {
            // e.stopPropagation();
            app.closeDialog();
        });
    }
    $(".dialog61>b,.dialog60>b").click(function () {
        app.closeDialog();
    });
    app.log("弹窗数据", JSON.stringify(param));
    var classDiv = param.dtype;
    if (classDiv == 'dialog78') {
        $("#showerweima").qrcode({
            render: "canvas", //也可以替换为table
            width: app.W * 0.4,
            height: app.W * 0.4,
            text: param.data.urlImg
        });
    }
    if (classDiv == 'dialog94') {
        function getCodeCallback() {
            // 执行倒计时
            app.countDown(60, function (value) {
                if (value.time != 0) {
                    $("#getSetmesseg").text(value.time + "s");
                } else {
                    _fmOpt.reset();
                    $("#getSetmesseg").text("获取验证码").attr("disabled", false).bind("click");
                }
            });
            app.getSmslogin({
                blackBox: isCnyCaptcha == 1 ? _fmOpt.getinfo() : "",
                yzm_token: getCnySms
            }, function (ret) {
                if (ret.code == 200) {
                    app.toast("发送成功");
                } else {
                    app.toast(ret.message);
                }
            })
        }
        //CNY 同盾插件初始化
        _fmOpt = {
            display: 'bind', //popup方式渲染验证码
            container: '#getSetmesseg', //验证码button渲染的目标DOM，自动展现方式下必需，详情见后文
            area: '', //对于custom模式，弹出窗口的加载容器，详情见后文
            partner: "renrenkj",
            appName: "renrenkj_h5",
            width: "",
            height: "",
            fmb: true,
            initialTime: new Date().getTime(),
            token: "renrenkj" + "-" + new Date().getTime() + "-" + Math.random().toString(16).substr(2),
            env: 1,
            getinfo: function () {
                return "e3Y6ICIyLjUuMCIsIG9zOiAid2ViIiwgczogMTk5LCBlOiAianMgbm90IGRvd25sb2FkIn0=";
            }
        };
        var fm = document.createElement('script');
        fm.type = 'text/javascript';
        fm.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'static.tongdun.net/captcha/main/tdc.js?ver=1.0&t=' + (new Date().getTime() / 600000).toFixed(0);
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(fm, s);
        _fmOpt.beforeValidate = function () {
            $("#getSetmesseg").attr("disabled", true).unbind("click");
            app.checkIsMechine("sms", function (ret, err) {
                if (ret.code == 200) {
                    isCnyCaptcha = ret.data;
                    if (isCnyCaptcha == 1) {
                        _fmOpt.onSuccess = function (validateToken) {
                            if (validateToken) {
                                getCnySms = validateToken;
                                getCodeCallback();
                            } else {
                                _fmOpt.reset();
                            }
                        };
                        return true;
                    } else {
                        getCodeCallback();
                        return false
                    }
                }
            })
            return true
        }
        _fmOpt.onClose = function (params) {
            $("#getSetmesseg").text("获取验证码").attr("disabled", false).bind("click");
        }
        $(".canleSmsCode").click(function () {
            app.closeDialog();
        });
        $("#phoneNum").on("input porpertychange", function () {
            if ($("#phoneNum").val().length >= 6) {
                $(".submitNum").css("backgroundColor", "#ffd203");
            } else {
                $(".submitNum").css("backgroundColor", "rgba(206, 206, 206, 1)");
            }
        })
        $(".submitNum").click(function () {
            if ($("#phoneNum").val().length < 6) return
            app.trigger("smsCodeNum", $("#phoneNum").val());
            setTimeout(function () {
                app.closeDialog();
            }, 1000)
        })
    }
    if (classDiv == 'dialog80') {
        var viewH = $("#argeeMaine").height();  //可见高度 
        var contentH = $(".argeeMaineText").height();  //内容高
        if (contentH < viewH) {
            $(".tipsText").hide();
            $(".readArgee").addClass("readArgeeYes").attr("data-event", param.data.dataEvent);
        }
        $("#argeeMaine").on("scroll", function () {
            var scroH = $("#argeeMaine").scrollTop();  //滚动高度
            var viewH = $("#argeeMaine").height();  //可见高度 
            var contentH = $(".argeeMaineText").height();  //内容高
            if (contentH <= (scroH + viewH)) {  //滚动条滑到底部啦
                $(".tipsText").hide();
                $(".readArgee").addClass("readArgeeYes").attr("data-event", param.data.dataEvent);
            } else {
                $(".tipsText").show();
            }
        });

        $(".readArgee").click(function (params) {
            var dataEvent = $(this).attr("data-event");
            if (dataEvent) {
                app.trigger(dataEvent);
                app.closeDialog();
            }
        })
        $(".closeDilogIcon").click(function (params) {
            app.closeDialog();
        })
    }
    if (classDiv == "dialog75") {
        $(".dialog75Button button").click(function (params) {
            app.trigger($(this).attr("data-event"), $(this).attr("data-token"));
        })
    }
    if (classDiv == "dialog102") {
        $(".dialog102 .subButton").click(function (params) {
            app.trigger($(this).attr("data-event"));
        })
    }
    if (classDiv == "dialog98" || classDiv == "dialog97" || classDiv == "dialog96") {
        $('.' + classDiv + ' button').click(function (params) {
            app.trigger($(this).attr("data-event"));
            if (classDiv == "dialog96") {
                app.closeDialog();
            }
        })
    }
    if (classDiv == "dialog99") {
        $("#sureCharge").on("change", function () {
            if ($(this).is(":checked")) {
                $(".changeButtonColor").css({ background: "#ffd203", color: "" });
            } else {
                $(".changeButtonColor").css("background", "#E7E7E7");
            }
        })
        $(".dialog99 button").on("click", function () {
            if ($(this).attr("data-event") == "canleOrderID") {
                if (!$("#sureCharge").is(":checked")) return
                app.trigger($(this).attr("data-event"));
            }
            app.closeDialog();
        })
    }
    if (classDiv == "dialog87") {
        $(".buttonBox button").click(function (params) {
            app.trigger($(this).attr("data-event"));
        })
    }
    if (classDiv == 'dialog76') {
        //分享海报
        var imgs = param.imgs;
        // console.log('imgs+'+JSON.stringify(imgs))
        // imgs.push(imgs[0]);
        var len = imgs.length;
        for (var i = 0; i < len; i++) {
            var curImg = imgs[i];
            var item = '<span class="item">' +
                '<img src="' + curImg.address + '" alt="" class="profitImg">' +
                '<span class="imgcover"></span>' +
                '<img src="../../image/power_select.png" class="choseImg">' +
                '</span>';
            $("#dialogSharePoster .imgs").append(item);
        }
        var boxWtRem = app.accAdd(3 * len, app.accMul(0.3, (len - 1)));
        var boxWtPx = Math.ceil(app.accMul(boxWtRem, app.htmlFs));
        $("#dialogSharePoster .imgs").width(boxWtPx + 'px');
        $("#dialogSharePoster .imgs").find('.item').eq(0).addClass('chosed');
        var choseProfit = 0;//选择的默认的海报index
        $("#dialogSharePoster .imgs").find('.item').click(function () {
            if (!$(this).hasClass('chosed')) {
                choseProfit = $(this).index();
                $(this).addClass('chosed').siblings('.item').removeClass('chosed');
            }
        });
        $("#dialogSharePoster .wx>div").click(function (e) {
            var clickIndex = $(this).index();
            var shareDate = {
                index: clickIndex, imgIndex: choseProfit
            };
            app.trigger('shareProfit', shareDate);
            app.closeDialog();
            e.stopPropagation();
        });
        $("#dialogSharePoster .cancel").click(function (e) {
            app.closeDialog();
            e.stopPropagation();
        })
    }
    $("#goBhpIoUrl").click(function () {
        app.openSysNavi("https://www.bhpa.io");
    })
    if (classDiv == 'dialog72') {
        $(".closeBtn").click(function () {
            app.closeDialog();
        })
    }
    if (classDiv == 'dialog61' || classDiv == 'dialog60') {
        $(".outBox").click(function () {
            app.closeDialog();
        })
    }
    $(".dialog76Button button").click(function () {
        app.trigger($(this).attr("data-event"));
    })
    if (classDiv == 'dialog53' || classDiv == 'dialog54') {
        //公共弹窗确认
        var tar = '.' + classDiv + ' ';
        $(tar + '.btns>span').click(function () {
            //确认关闭小额支付
            var event = $(this).data('event');
            app.trigger(event);
            app.closeDialog();
        });
    }
    if (classDiv == 'dialog50') {
        //小额支付键盘/动态输入
        var numberkeyboard = {//验证码键盘
            getVal: function (len, callback) {
                //需要的验证码字符长度，回调函数
                var inputVal = '';
                var cls = '';
                $('.key_item').unbind('click').bind('click', function () {
                    var thiz = $(this);
                    var t = null;
                    thiz.siblings('.key_item').removeClass('active').removeClass('delete');
                    if (thiz.hasClass('empty')) {
                        cls = 'delete';
                        inputVal = '';
                    } else if (thiz.hasClass('remove')) {
                        cls = 'delete';
                        inputVal = inputVal.slice(0, inputVal.length - 1)
                    } else {
                        cls = 'active';
                        var curval = thiz.text();
                        inputVal = inputVal + curval;
                    }
                    thiz.addClass(cls);
                    t = setTimeout(function () {
                        thiz.removeClass('active').removeClass('delete');
                        clearTimeout(t);
                        t = null;
                    }, 200);
                    inputVal = inputVal.slice(0, len);
                    callback(inputVal);
                });
            },
            empty: function () {
                //清空输入
                $(".empty").click();
            }
        };
        var timeout = null;
        var interval = null;
        var time = 60;
        $(".dialog50 .closeBtn").click(function () {
            app.trigger('cancel');
            app.closeDialog();
        });
        function getAgain() {
            interval = setInterval(function () {
                if (time >= 1) {
                    $(".getAgain").text(time + '秒');
                    time--;
                } else {
                    clearInterval(interval);
                    interval = null;
                    time = 60;
                    $(".getAgain").text('重新获取')
                }
            }, 1000);
        }
        getAgain();
        $(".getAgain").click(function () {
            if (interval == null) {
                getAgain();
                numberkeyboard.empty();
                app.trigger(param.data.sendCodeAgain)//发送重新获取验证码通知
            }
        });
        timeout = setTimeout(function () {
            $(".key_container").removeClass('isHide');
            clearTimeout(timeout);
            timeout = null;
            numberkeyboard.getVal(6, function (yzm) {
                var arr = yzm.split('');
                for (var i = 0; i <= 5; i++) {
                    var setVal = arr[i] ? arr[i] : '';
                    $(".dialog50  .inputSix input").eq(i).val(setVal);
                }
                if (arr.length == 6) {
                    timeout = setTimeout(function () {
                        app.trigger(param.data.sucEvt, { yzm: yzm });
                        clearTimeout(timeout);
                        timeout = null;
                    }, 500)
                }
            });
        }, 500);
    }
    if (classDiv == 'dialog49') {
        $('.dialog49 .btns>span').click(function () {
            //提示开通小额支付
            var event = $(this).data('event');
            app.trigger(event);
            app.closeDialog();
        });
    }
    if (classDiv == 'dialog51') {
        $('.dialog49 .btns>span').click(function () {
            //确认关闭小额支付
            var event = $(this).data('event');
            app.trigger(event);
            app.closeDialog();
        });
    }
    if (param.dtype == "dialog11") {
        $(".chooseButton").on("click", "button", function () {
            var thisEvent = $(this).data("event");
            app.trigger(thisEvent);
        })
    }
    if (param.dtype == "dialog34") {
        var index = 1;
        var maxLength = 7;
        if (param.isHaveBhp == false) {
            maxLength = 6;
        }
        var thisSetID = setInterval(function () {
            $("#id" + index).fadeIn().css({
                display: "flex",
                display: "-webkit-flex"
            });
            index++;
            if (index > maxLength) {
                $("#transEvent").attr("data-flag", "true").css("color", "#181818");
                clearInterval(thisSetID);
            }
        }, 800);
        $("#transEvent").on("click", function () {
            var thisflag = $(this).attr("data-flag");
            if (thisflag == "false") return
            var thisGo = $(this).attr("data-event")
            app.trigger(thisGo);
        })
    }
    if (param.dtype == "dialog341") {
        var index = 1;
        var maxLengthNew = 6;
        if (param.isHaveBhp == false) {
            maxLengthNew = 5;
        }
        var thisSetID = setInterval(function () {
            $("#id" + index).fadeIn().css({
                display: "flex",
                display: "-webkit-flex"
            });
            index++;
            if (index > maxLengthNew) {
                $("#transEventNew").attr("data-flag", "true").css("color", "#181818");
                clearInterval(thisSetID);
            }
        }, 800);
        $("#transEventNew").on("click", function () {
            var thisflag = $(this).attr("data-flag");
            if (thisflag == "false") return
            var thisGo = $(this).attr("data-event");
            app.trigger(thisGo);
        })
    }
    $(".btns button").click(function () {
        var event = $(this).data("event");
        if (event) {
            app.trigger(event, param.data.extra);
        }
        app.tout(300, function () {
            app.closeDialog();
        });
    });
    $(".btns p").click(function () {
        var event = $(this).data("event");
        if (event) {
            app.trigger(event, param.data.extra);
        }
        app.tout(300, function () {
            app.closeDialog();
        });
    });
    // 监听进度条进度更新
    app.listen("update_progress", function (ret, err) {
        app.log("--------收到update_progress--------", ret);
        if (ret.value.state == 0) {
            $("#progress").css("width", ret.value.percent + "%");
            return;
        }
        if (ret.value.state == 1) {
            $("#progress").css("width", ret.value.percent + "%");
            $(".dialog4 .text").text("下载完成！");
            return;
        }
        if (ret.value.state != 0 && ret.value.state != 1) {
            $("#progress").css("width", ret.value.percent + "%");
            $(".dialog4 .text").text("下载失败！");
        }
    });
    $(".dialog9 li").click(function () {
        var event = $(this).data("event");
        var index = $(this).data("index");
        if (event) {
            app.trigger(event, {
                index: index
            });
        }
        app.tout(300, function () {
            app.closeDialog();
        });
    });
    $(".dialog10 i").click(function () {
        var event = $(this).data("event");
        if (event) {
            app.trigger(event, param.data.extra);
        }
        app.tout(300, function () {
            app.closeDialog();
        });
    });
    $(".btns i.reloads").click(function () {
        var event = $(this).data("event");
        if (event) {
            app.trigger(event, param.data.extra);
        }
        app.tout(300, function () {
            app.closeDialog();
        });
    });
    if (param.dtype == "dialog13") {
        $(".dialog13 btns button").click(function () {
            var event = $(this).data("event");
            if (event) {
                app.trigger(event);
            }
            app.closeDialog();
        });
    }
    if (param.dtype == "dialog92") {
        $("ul li").click(function () {
            var event = $(this).data("coin");
            if (event) {
                app.trigger("addresCoin", event);
            }
            app.closeDialog();
        });
    }
    if (param.dtype == "dialog93") {
        $(".dialog93 button").click(function () {
            var event = $(this).data("event");
            if (event) {
                app.trigger(event);
            }
            app.closeDialog();
        });
    }
    $(".dialog18 li").click(function () {
        var event = $(this).data("event");
        var index = $(this).data("index");
        if (event) {
            // 生成canvas图片
            if (canvas) {
                window.getImgFromCanvas(canvas, "share.png", function (ret) {
                    app.trigger(event, {
                        index: index,
                        imgPath: ret
                    });
                });
            }
        }
        app.tout(1500, function () {
            app.closeDialog();
        });
    });
    $(".dialog40>.btnClass>button").click(function () {
        var event = $(this).data("event");
        if (event) {
            app.trigger(event);
            app.closeDialog();
        }
    });
    $(".dialog40>.closeDlog").click(function () {
        app.closeDialog()
    });
    function canvasImg(tag) {
        // var nameId = "showAboutNews";
        // if (tag == 2) {
        //     nameId = "showText191"
        // } else if (tag == 1) {
        //     nameId = "tetsegbIdName"
        // } else if (tag == 3) {
        //     nameId = "tetsegbIdName"
        // }
        htmltoImage.init({
            'el': document.getElementById("showAboutNews"),
            'isImageObject': true,
        }, function (res, err) {
            // alert(JSON.stringify(res));
            if (res) {
                var base64Str1 = htmltoImage.cutprefixBase64(res.base64str);
                var trans = api.require('trans');
                trans.saveImage({
                    base64Str: base64Str1,
                    imgPath: "fs://share/",
                    imgName: 'testimg.png',
                }, function (ret, err) {
                    // alert("测试Alert" + JSON.stringify(ret) + JSON.stringify(err));
                    if (ret.status) {
                        app.trigger("img_share", {
                            index: tag,
                            imgPath: "fs://share/testimg.png"
                        });
                        app.closeDialog();
                    } else {
                        app.toast("生成图片失败");
                    }
                });
            } else {
                app.toast("转换失败");
                alert(JSON.stringify(err));
            }
        })
    }
    if (param.dtype == "dialog91") {
        $(".dialog91 .openUrladress").click(function () {
            var urlAdr = $(this).attr("data-url");
            if (urlAdr) {
                app.openSysNavi(urlAdr);
            }
        })
    }
    if (param.dtype == "dialog191") {
        $("#newsImgText").qrcode({
            render: "canvas", //也可以替换为table
            width: 70,
            height: 70,
            text: param.data.extra.shareQrTxt
        });
        var trans = api.require('trans');
        trans.decodeImgToBase64({
            imgPath: 'widget://image/zixunbgx.png'
        }, function (ret, err) {
            if (ret.status) {
                str = ret.base64Str;
                $("#transferBaseImg").attr("src", "data:image/png;base64," + str)
            } else {
                console.log(JSON.stringify(err));
            }
        });
        var lens = $('.dialog191 img').length;
        var begin = 0;
        var srcArr = [];
        $(".dialog191 img").each(function () {
            srcArr.push($(this).attr('src'));
        })
        for (var i = 0; i < srcArr.length; i++) {
            var newImg = new Image();
            newImg.src = srcArr[i];
            newImg.onload = function () {
                begin++;
                if (begin == lens) {
                    $("#showAboutNews").scrollTop(0);
                    $("#testUmg").scrollTop(0);
                    app.closeFlower();
                }
            }
        }
    }
    $(".dialog191 .dialogBottom").on("click", "li", function (e) {
        e.stopPropagation(); //  阻止事件冒泡
        var event = $(this).data("event");
        var index = $(this).data("index");
        canvasImg(index);
    });
    if (param.dtype == "dialog21") {
        $("#chenckRechcge button").click(function () {
            var event = $(this).data("event");
            if (event) {
                app.trigger(event);
            }
            app.closeDialog();
        });
    }
    if (param.dtype == "dialog24") {
        $(".button p").click(function () {
            var event = $(this).data("event");
            if (event) {
                app.trigger(event);
                $(this).unbind();
            }
            app.closeDialog();
        });
    }
    if (param.dtype == "dialog29") {
        $('.outBox').unbind('click');
        $(".goCertifiton button").click(function () {
            var event = $(this).data("event");
            if (event) {
                app.trigger(event);
                app.closeDialog();
                $(this).unbind();
            }
            app.closeDialog();
        });
    }
    if (param.dtype == "dialog29copy") {
        $('.outBox').unbind('click');
        app.listen('add_relnameSuccess', function () {
            app.closeDialog();
        })
        $(".goCertifiton .relname_sure").click(function (e) {
            var goCerfition = {
                page: "common/headerwin",
                name: "choosecerfertion_headerwin",
                param: {
                    subpage: "my/choosecerfertiontwo",
                    name: "choosecerfertiontwo",
                    title: "实名校验",
                    goAddMoney: true
                }
            };
            var recoinNumber = JSON.stringify(goCerfition);
            app.goPushPage(recoinNumber);
            app.closeDialog();
            e.stopPropagation();
        });
        $(".goCertifiton .cancelRelname").click(function (e) {
            app.closeDialog();
            e.stopPropagation();
        })
    }
    if (param.dtype == "dialog40" || param.dtype == "" || param.dtype == "dialog46") {
        $('.outBox').unbind('click');
    }

    if (param.dtype == "dialog25") {
        $(".button p").click(function () {
            var event = $(this).data("event");
            if (event) {
                app.trigger(event);
                $(this).unbind();
            }
            app.closeDialog();
        });
    }
    if (param.dtype == "dialog251") {
        $("#dialogbutton").on("click", "p", function () {
            var event = $(this).data("event");
            if (event) {
                app.trigger(event);
                $(this).unbind();
            }
            app.closeDialog();
        });
    }
    if (param.dtype == "dialog71" || param.dtype == "dialog89") {
        $(".dialogButton").on("click", "p", function () {
            var event = $(this).data("event");
            if (event) {
                app.trigger(event);
                $(this).unbind();
            }
            app.closeDialog();
        });
    }
    if (param.dtype == "dialog103") {
        $(".dialogButton").on("click", "p", function () {
            var event = $(this).data("event");
            if (event) {
                app.trigger(event);
                $(this).unbind();
            }
            app.closeDialog();
        });
    }
    if (param.dtype == "dialog261") {
        $(".dialog261 .button p").click(function () {
            var event = $(this).data("event");
            if (event) {
                app.trigger(event);
            }
            app.closeDialog();
        });
    }

    if (param.dtype == "dialog27") {
        $("#checkAgree span").click(function () {
            var event = $(this).attr("data-event");
            if (event) {
                app.trigger(event);
            }
            app.closeDialog();
        });
    }

    // 处理特殊弹窗
    if (param.dtype == "dialog12") {
        app.log("----dialog12----", "特殊对话框");
        $("." + param.dtype).css("left", "0rem");
    }

    if (param.dtype == "dialog46") {
        $(".dialog46>.btnClass>button").click(function () {
            var event = $(this).attr("data-event");
            if (event) {
                app.trigger(event);
            }
            app.closeDialog();
        });
    }
    $("." + param.dtype).fadeIn(300);

    $(".dialog19 #cancelBtn").click(function () {
        app.closeDialog();
    });
    $(".d-btns img").click(function () {
        var event = $(this).data("event");
        if (event) {
            app.trigger(event, param.data.extra);
        }
        app.tout(300, function () {
            app.closeDialog();
        });
    });
    $("#holder_16,.dialog12>.d-del,.close,.closeCover,.delete").click(function () {
        app.tout(300, function () {
            app.closeDialog();
        });
    })
    $(".useRight").click(function () {
        if (app.clipboard) {
            var text = $(this).data("clipboard-text");
            app.clipboard.set({
                value: text
            }, function (ret, err) {
                app.log("copy", ret);
                if (ret.status) {
                    app.toast("收款帐号已复制到剪贴板");
                } else {
                    app.toast("复制失败！");
                }
            });
        }
    });
    $(".dialogButton73").click(function () {
        var isCheck = $("#checkInput").prop("checked");
        if (isCheck == true) {
            app.setStorage("c2CDialog", true);
        }
        app.closeDialog();
    })
    $("#closeCoverNew").on("click", function (params) {
        var thisData = $(this).attr("data-avent");
        app.trigger(thisData);
    })
    app.handlePage();
    if (param.dtype == "dialog42") {
        $(".outBox").unbind();
        $(".colseDialog,.imgButton").click(function () {
            app.closeDialog();
        })
        $(".showCheckBox input").on("input porpertychange", function () {
            var checkStatus = $("#checkMine").prop('checked');
            if (checkStatus) {
                $(".waringText").show();
            } else {
                $(".waringText").hide();
            }
        });
        $(".btnnewClass .GocheckRealName").click(function () {
            var checkIsreal = $("#checkMine").prop('checked');
            var checkIstrue = $("#istrueText").prop('checked');
            if (!checkIsreal || !checkIstrue) {
                app.toast("请先确认相关内容");
                return
            }
            var event = $(this).data("event");
            if (event) {
                app.trigger(event);
            }
            app.tout(300, function () {
                app.closeDialog();
            });
        });
    }
    if (param.dtype == "dialog421") {
        $(".outBox").unbind();
        $(".colseDialog,.imgButton").click(function () {
            app.closeDialog();
        })
        $(".btnnewClass .GocheckRealName").click(function () {
            var event = $(this).data("event");
            if (event) {
                app.trigger(event);
            }
            app.tout(300, function () {
                app.closeDialog();
            });
        });
    }
    // 把窗口设置为最上层
    if (app.isiPhone10) {
        var div = "<div style='height: 0.4rem;background:#fff'></div>";
        $(".cancal_tou").after(div);
    }
};